/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gestionnaires;

import utilisateurs.modeles.Adresse;
import utilisateurs.modeles.Utilisateur;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Stateless
public class GestionnaireAdresse extends AbstractFacade<Adresse> {

    @PersistenceContext(unitName = "BlueRayPU")
    private EntityManager em;
    GestionnaireUtilisateurs ef;

    @Override
    protected EntityManager getEntityManager() {
        return em;
    }

    public GestionnaireAdresse() {
        super(Adresse.class);
    }

    public Adresse create(String firstName, String lastName, String company, String street, String zipCode, String city, String country, String phone) {
        Adresse a = new Adresse(firstName, lastName, company, street, zipCode, city, country, phone);
        create(a);
        return a;
    }
}
